package cn.tuling.controller;

import cn.tuling.entity.DO.Product;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ProductController {

    @GetMapping("/product/{id}")
    public Product getProduct(@PathVariable Integer id,
                              @RequestHeader("token") String token) throws InterruptedException {
        return new Product(id, "商品名称：" + token);
    }
}
